Question and answer generator

ABSTRACT

The present invention provides an automated solution for generating a question document and an answer document from a database of questions and answers. The solution utilizes an extensible markup language to define the database. The database is then converted into a first Document Object Model (DOM) tree. The first DOM tree may then be used in prompting a user to enter the number of questions from each section to be generated. Once this input is received, nodes from the first DOM tree are randomly selected using the data received from the input. These randomly selected nodes are then used to create a second DOM tree representing the quiz or test. This second DOM tree may then be converted to a readable or printable format using a transformation, such as an stylesheet language transformation.

FIELD OF THE INVENTION

[0001] The present invention relates to quizzes and tests. More specifically, the present invention relates to the use of computer software to automatically select questions and answers for quizzes and tests.

BACKGROUND OF THE INVENTION

[0002] Quizzes and tests are common in academic settings. However, they are becoming more common in the workplace as well. One area in which they have gained in importance is in recruitment, especially for jobs requiring a large number of employees having considerable technical skills, such as engineers or computer programmers. In those areas, quizzes and tests may be used to ensure that the applicant pool has sufficient technical qualifications before applying human resource time to interviewing the candidates.

[0003] Since businesses are joining academicians as test-givers, unsurprisingly there is an increased emphasis placed on cost-efficiency in the creation of tests and quizzes. While the time it takes a person to choose a set of questions from a large repository of ready-made questions may be adequate for academia, that person's time may be far more valuable in the business setting. Thus, businesses have sought to automate this selection process.

[0004] One way to automate the process is to simply randomly pick questions from a database of questions. For example, a Star Office™ (created by Sun Microsystems, Inc. of Palo Alto, Calif.) document storing the database of questions may be accessed, with random questions being selected using a random number generator in a conventional manner. A drawback of this method, however, is that it does not provide for sections within the database, without the random question picking program knowing ahead of time what sections exist in the database. For example, a database of standardized high school test questions may be divided into “English” and “Math” sections, with the program picking a certain number of random “English” questions and a certain number of random “Math” questions. This, however, forces the program to be aware of the section when the program is created, limiting its portability. In essence, each time a new type of test is created the program must be redesigned.

[0005] Furthermore, computerized testing programs in the past have focused on the case where the testee is taking the test on the computer, leaving largely unexamined the case where the computer is merely a tool for the tester in the creation of written tests. For example, in the case where written tests are to be prepared, it is often preferable to not only randomly generate tests, but to also make corresponding answer keys for the tester to use in grading the test. Previous solutions have not examined how to integrate this need into the computerized system, as such answer keys are unnecessary when the testee takes the test on the computer.

[0006] What is needed is a solution which allows a portable test generation program to dynamically generate written tests and answer keys on-the-fly.

BRIEF DESCRIPTION OF THE INVENTION

[0007] The present invention provides an automated solution for generating a question document and an answer document from a database of questions and answers. The solution utilizes an extensible markup language to define the database. The database is then converted into a first Document Object Model (DOM) tree. The first DOM tree may then be used in prompting a user to enter the number of questions from each section to be generated. Once this input is received, nodes from the first DOM tree are randomly selected using the data received from the input. These randomly selected nodes are then used to create a second DOM tree representing the quiz or test. This second DOM tree may then be converted to a readable or printable format using a transformation, such as an stylesheet language transformation.

BRIEF DESCRIPTION OF THE DRAWINGS

[0008] The accompanying drawings, which are incorporated into and constitute a part of this specification, illustrate one or more embodiments of the present invention and, together with the detailed description, serve to explain the principles and implementations of the invention.

[0009] In the drawings:

[0010]FIG. 1 is a flow diagram illustrating a method for generating a question document and an answer document from a database of questions and answers in accordance with a specific embodiment of the present invention.

[0011]FIG. 2 is a diagram illustrating an example of a first Document Object Model (DOM) tree in accordance with a specific embodiment of the present invention.

[0012]FIG. 3 is a diagram illustrating a screen capture of a user interface in accordance with a specific embodiment of the present invention.

[0013]FIG. 4 is a diagram illustrating an example of a second DOM tree in accordance with a specific embodiment of the present invention.

[0014]FIG. 5 is a block diagram illustrating an apparatus for generating a question document and an answer document from a database of questions and answers in accordance with a specific embodiment of the present invention.

DETAILED DESCRIPTION

[0015] Embodiments of the present invention are described herein in the context of a system of computers, servers, communication mechanisms, and tags. Those of ordinary skill in the art will realize that the following detailed description of the present invention is illustrative only and is not intended to be in any way limiting. Other embodiments of the present invention will readily suggest themselves to such skilled persons having the benefit of this disclosure. Reference will now be made in detail to implementations of the present invention as illustrated in the accompanying drawings. The same reference indicators will be used throughout the drawings and the following detailed description to refer to the same or like parts.

[0016] In the interest of clarity, not all of the routine features of the implementations described herein are shown and described. It will, of course, be appreciated that in the development of any such actual implementation, numerous implementation-specific decisions must be made in order to achieve the developer's specific goals, such as compliance with application- and business-related constraints, and that these specific goals will vary from one implementation to another and from one developer to another. Moreover, it will be appreciated that such a development effort might be complex and time-consuming, but would nevertheless be a routine undertaking of engineering for those of ordinary skill in the art having the benefit of this disclosure.

[0017] In accordance with the present invention, the components, process steps, and/or data structures may be implemented using various types of operating systems, computing platforms, computer programs, and/or general purpose machines. In addition, those of ordinary skill in the art will recognize that devices of a less general purpose nature, such as hardwired devices, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), or the like, may also be used without departing from the scope and spirit of the inventive concepts disclosed herein.

[0018] The present invention utilizes an extensible markup language to maintain a question bank, generates a Document Object Model (DOM) tree from the question bank, randomly selects nodes from the DOM tree to create another DOM tree, and then converts the second DOM tree into a printable file. This allows the program to accept a wide variety of different types of question banks without the need for reprogramming.

[0019] An extensible markup language is any markup language where the programmer may define tags. These tags are often defined in a document type definition (DTD). The Extensible Markup Language (XML) standard is the most common type of extensible markup languages, but one of ordinary skill in the art will recognize that others may exist either now or in the future and these other extensible markup languages may be used with the present invention rather than XML. Nevertheless, through much of this specification, XML will be assumed to be the language of choice.

[0020]FIG. 1 is a flow diagram illustrating a method for generating a question document and an answer document from a database of questions and answers in accordance with a specific embodiment of the present invention. The database of question and answers may be in XML format. A DTD may be defined to define the XML document. It is possible to convert a Star Office™ or other word processing document to an XML document rather than create the XML document from scratch if that is desired. The DTD will be discussed in more detail later in this application.

[0021] At 100 in FIG. 1, the system creates a first DOM tree of the entire question bank. This may be accomplished using a parsing tool, such as Java Application Program Interface for XML Parsing (JAXP). At 102, a user interface may then be provided to display the sections and the number of available questions in each and allow the user to enter the number of questions from each section that should be on the test.

[0022] At 104, the system randomly selects a number of nodes from the first DOM tree. The number of nodes and the sections from which they are selected are based on the inputs provided by the user in 102. At 106, the system makes a second DOM tree from the randomly selected nodes. This second DOM tree represents the final question and answer sheet. However, since it is unlikely that a user will wish to use the second DOM tree directly, a stylesheet language transformation, such as an Extensible Stylesheet Language (XSL), transformation may be applied to the second DOM tree at 108, which converts it to a more user-friendly and printable format, such as Hypertext Markup Language (HTML) or other web presentation language. Other types of refinement are possible as well.

[0023] An example is provided herein showing how the method is applied to an XML document. This example should not be read to be limiting. However, certain elements within the example may be independently patentable and the example should not be read as showing obvious variations of the invention.

[0024] An XML DTD may be used to define the format of the XML document containing the questions and answers. The DTD separates the questions/answers into various sections. Furthermore, the DTD creates the question as an element, and the answer to that question as an attribute to the question element. This allows the question and answer to exist as a single data structure, thus avoiding complications wherein an answer may be misidentified with the wrong question. This DTD is as follows:

[0025] <?Xml version=“1.0” standalone=“no”?>

[0026] <!DOCTYPE WRITTEN-TEST[

[0027] <!ELEMENT WRITTEN-TEST (INSTRUCTIONS, ALL,-QUESTIONS)>

[0028] <!ELEMENT INSTRUCTIONS (INSTR-LINE)*>

[0029] <!ELEMENT INSTR-LINE (#PCDATA)>

[0030] <!ELEMENT ALL-QUESTIONS (SECTION)*>

[0031] <!ELEMENT SECTION (HEAD, BODY)>

[0032] <!ATTLIST SECTION NAME CDATA #REQUIRED>

[0033] <!ATTLIST SECTION INCLUDE CDATA #REQUIRED>

[0034] <!ATTLIST SECTION PICK CDATA #REQUIRED>

[0035] <!ELEMEXT HEAD (TITLE, CONTENTS)>

[0036] <!ELEMENT TITLE (#PCDATA)>

[0037] <!ELEMENT CONTENTS (#PCDATA)>

[0038] <!ELEMENT BODY (QUESTION)*>

[0039] <!ELEMENT QUESTION (STATEMENT, OPTIONS)>

[0040] <!ELEMENT STATEMENT (DESCRIPTION | CODE | CHOIC8)+>

[0041] <!ELEMENT OPTIONS (OPTION-1, OPTION-2, OPTION-3?, OPTION-4?, OPTION-5?, OPTION-6?)>

[0042] <!ELEMENT DESCRIPTION (#PCDATA)>

[0043] <!ELEMENT CODE (CODE-LINE)*>

[0044] <!ELEMENT CODE-LINE (#PCDATA)>

[0045] <!ELEMENT CHOICE (CHOICE-LINE)*>

[0046] <!ELEMRNT CHOICE-LINE (#PCDATA)>

[0047] <!ELEMENT OPTION-1 (#PCDATA)>

[0048] <!ATTLIST OPTION-1 CORRECT CDATA #IMPLIED>

[0049] <!ELEMENT OPTION-2 (#PCDATA)>

[0050] <!ATTLIST OPTION-2 CORRECT CDATA #IMPLIED>

[0051] <!ELEMENT OPTION-3 (#PCDATA)>

[0052] <!ATTLIST OPTION-3 CORRECT CDATA #IMPLIED>

[0053] <!ELEMENT OPTION-4 (#PCDATA)>

[0054] <!ATTLIST OPTION-4 CORRECT CDATA #IMPLIED>

[0055] <!ELEMENT OPTION-5 (#PCDATA)>

[0056] <!ATTLIST OPTION-5 CORRECT CDATA #IMPLIED>

[0057] <!ELEMENT OPTION-6 (#PCDATA)>

[0058] <!ATTLIST OPTION-6 CORRECT CDATA #IMPLIED>

[0059] ]>

[0060] In accordance with the above DTD, an XML document containing the database of questions and answers may be provided as follows:

[0061] <WRITTEN-TEST>

[0062] <INSTRUCTIONS>

[0063] <INSTR-LINR>Please do not write on this booklet</INSTR-LINE>

[0064] <INSTR-LINE>Choose one correct answer, unless otherwise specified</INSTR-LINE>

[0065] <INSTR-LINE>Mark your answers on the answer booklet provided</INSTR-LINE>

[0066] <INSTR-LINE>Source code in question statements is marked as a numbered sequence</INSTR-LINE>

[0067] <INSTR-LINE>Write your name, e-mail address and contact phone number on the answer booklet</INSTR-LINE>

[0068] <INSTR-LINE>Correct answers carry TWO marks</INSTR-LINE>

[0069] <INSTR-LINE>Wrong answers carry ONE NEGATIVE mark</INSTR-LINE>

[0070] <INSTR-LINE>Duration 1 hour</INSTR-LINE>

[0071] </INSTRUCTIONS>

[0072] <ALL-QUESTIONS>

[0073] <SECTION NAME=“BASIC-JAVA” INCLUDE=“YES” PICK=“20”>

[0074] <HEAD>

[0075] <TITLE>Java Programming</TITLE>

[0076] <CONTENTS>Basic Java Concepts</CONTENTS>

[0077] </HEAD>

[0078] <BODY>

[0079] <QUESTION>

[0080] <STATEMENT>

[0081] <DESCRIPTION>

[0082] Which of the following signatures is valid for the main( )method entry point of an application?

[0083] </DESCRIPTION>

[0084] </STATEMENT>

[0085] <OPTIONS>

[0086] <OPTION-1>public static void main0</OPTION-1>

[0087] <OPTION-2 CORRECT=“TRUE”>public static void main(String arg[])</OPTION-2>

[0088] <OPTION-3>public void main(String [] arg)</OPTION-3>

[0089] <OPTION-4>public static int main(String [] arg)</OPTION-4>

[0090] </OPTIONS>

[0091] </QUESTION>

[0092] . . . ALL THE QUESTIONS/ANSWERS GO HERE

[0093] <QUESTION>

[0094] <STATEMENT>

[0095] <DESCRIPTION>

[0096] What will be output of the following code?

[0097] </DESCRIPTION>

[0098] <CODE>

[0099] <CODE-LINE>main( )(</CODE-LINE>

[0100] <CODE-LINE>int i=2;</CODE-L1NE>

[0101] <CODE-LINE>char* foo=“bar”;</CODE-LINE:>

[0102] <CODE-LINE>printf(“% c”, foo[i]),</CODE-LINE>

[0103] <CODE-LINE>)</CODE-LINE>

[0104] </CODE>

[0105] </STATEMENT>

[0106] <OPTIONS>

[0107] <OPTION-1>Will throw a core dump</OPTXON-1>

[0108] <OPTION-2 CORRECT=“TRUE”>Compilation Error</OPTION-2>

[0109] <OPTION-3>r</OPTION-3>

[0110] <OPTION-4>a</OPTION-4>

[0111] </OPTIONS>

[0112] </QUESTION>

[0113] </BODY>

[0114] </SECTION>

[0115] </ALL-QUESTIONS>

[0116] </WRITTEN-TEST>

[0117] A first DOM tree may then be created from this XML document. The XML document above is shortened due to space constraints, but it otherwise would contain 5 sections, entitled “BASIC-JAVA”, “ENTERPRISE-JAVA”, “GUI-JAVA”, “SHELL-SCRIPTS-QA”, and “CPLUSPLUS-PROGRAMMING”. “BASIC-JAVA” has 82 possible questions, “ENTERPRISE-JAVA” has 13 possible questions, “GUI-JAVA” has 14 possible questions, “SHELL-SCRIPTS-QA” has 27 possible questions, and “CPLUSPLUS-PROGRAMMING” has 30 possible children. What follows is a streaming output of the process of converting the XML document to the first DOM tree:

[0118] +export JAVA_HOME=/usr/local/java/jdkl.3/solaris

[0119] +export JAVA=/usr/local/java/jdkl.3/solaris/bin/java

[0120] +export JAVA=/usr/local/java/jdkl.3/solaris/bin/javac

[0121] ++pwd

[0122] CURRENT DIR=/home/arung/workarea/J1/jaxp

[0123] +echo/home/arung/workarea/jl/jaxp /home/arung/workarea/jl/jaxp+export

[0124] CLASSPATH=.

[0125] :/home/arung/workarea/j1/jaxp/lib/jaxp.jar:/home/arung/workarea/j1/jaxp/lib/crimson.jar:/home/arung/workarea/j1/jaxp/lib/xalan.jar:/usr/local/java/jdkl.3/solaris/

[0126] lib/tools.jar

[0127] +export JAVA-FLAGS=−classpath

[0128] _:/home/arung/workarea/j1/jaxp/lib/jaxp.jar:/home/arung/workarea/j1/jaxp/lib/crimson_jar:/home/arung/workarea/j1/jaxp/lib/xalan-jar:/usr/local/java/jdkl.3/solaris/lib/tools.jar+export JAVAC_FLAGS=−d . −classpath

[0129] .:/home/arung/workarea/j1/jaxp/lib/jaxp.jar:/home/arung/workarea/j1/jaxp/lib/crimson. jar:/home/arung/workarea/jl/jaxp/lib/xalan-jar: /usr/local/java/jdkl.3/solaris/lib/tools.jar+echo Cleaning . . .

[0130] Cleaning . . .

[0131] +/bin/rm −rf exam

[0132] +echo Building . . .

[0133] Building . . .

[0134] +/usr/local/java/jdkl.3/solaris/bin/javac −d −classpath

[0135] .:/home/arung/workarea/jl/jaxp/lib/jaxp.jar:/home/arung/workarea/j1/jaxp/lib/crimson. jar:/home/arung/workarea/j1/jaxp/lib/xalan.jar:/usr/local/java/jdkl.3/solaris/lib/tools. jar src/GUI.java src/DOMEcho.java

[0136] +echo Running . . .

[0137] Running . . .

[0138] +/usr/local/java/jdkl.3/solaris/bin/java −classpath

[0139] .: /home/arung/workarea/j 1/jaxp/lib/jaxp. jar: /home/arung/workarea/j 1/jaxp/lib/crimson.jar:/home/arung/workarea/j1/jaxp/lib/xalan.jar;/usr/local/java/ jdkl.3/solaris/lib/tools.jar exam.GUI

[0140] jsw_test.xml jsw_test.xsl jsw_answer.xsl

[0141] Getting section count . . .

[0142] There are 5 sections

[0143] Got section count as 5

[0144] Getting section labels

[0145] 0th section's name is BASIC-JAVA

[0146] 1th section's name is ENTERPRISE-JAVA

[0147] 2th section's name is GUI-JAVA

[0148] 3th section's name is SHELL-SCRIPTS-QA

[0149] 4th section's name is CPLUSPLUS-PROGRAMMING

[0150] Got section labels as

[0151] 0th section label; BASIC-JAVA

[0152] 1th section label: ENTERPRISE -JAVA

[0153] 2th section label: GUI-,JAVA

[0154] 3th section label: SHELL-SCRIPTS-QA

[0155] 4th section label: CPLUSPLUS-PROGRAMMING

[0156] Getting Questions in a section

[0157] There are total of 5 sections

[0158] 82 children of 1th section

[0159] 13 children of 2th section

[0160] 14 children of 3th section

[0161] 27 children of 4th section

[0162] 30 children of 5th section

[0163] Getting total questions in all sections

[0164] There are total of 5 sections

[0165] This creates a first DOM tree, as depicted in FIG. 2. This also displays a user interface to the user shoring the number of sections, names of the sections, and number of possible questions for each section. FIG. 3 is a diagram illustrating this user interface. After the user enters the number of questions to be selected (assume 20 from the “BASIC-JAVA” section and 10 from each of the others for a total of 60), the following streaming output of the process of recognizing the input may occur:

[0166] Getting PICK questions in all sections

[0167] 20 questions to be selected from “BASIC-JAVA” section.

[0168] 10 questions to be selected from “ENTERPRISE-JAVA” section.

[0169] 10 questions to be selected from “GUI-JAVA” section.

[0170] 10 questions to be selected from “SHELL-SCRIPTS-QA” section.

[0171] 10 questions to be selected from “CPLUSPLUS-PROGRAMMING” section.

[0172] Frame created . . .

[0173] Window Listener associated . . .

[0174] Question panel added . . .

[0175] Files panel added . . .

[0176] Total questions selected: 60

[0177] Following this, the random selection of nodes may occur. What follows is a streaming output representing that process:

[0178] Generate button clicked

[0179] 10 82

[0180] 10 13

[0181] 10 14

[0182] 10 27

[0183] 10 30

[0184] You need to select “50” questions.

[0185] You've selected “50” questions.

[0186] And you got it right!

[0187] Repository: jsW-test.xml

[0188] Question XSL Script: jsw_test.xsl

[0189] Question Output Script: question.html

[0190] Answer XSL Script: jsw_answer.xsl

[0191] Answer Output Script: answer.html

[0192] question.html

[0193] File extension: .html

[0194] answer.html

[0195] File extension: .html

[0196] DOM re-generated.

[0197] There are 5 section node(s).

[0198] There are 82 question nodes

[0199] Selecting 10 out of total 82 nodes . . .

[0200] Copying nodes from the original DOM tree . . .

[0201] Copying the 65th node

[0202] Copying the 27th node

[0203] Copying the 17th node

[0204] Copying the 77th node

[0205] Copying the 14th node

[0206] Copying the 64th node

[0207] Copying the 20th node

[0208] Copying the 30th node

[0209] Copying the 48th node

[0210] Copying the 73th node

[0211] Nodes copied.

[0212] There are 13 question nodes

[0213] Selecting 10 out of total 13 nodes . . .

[0214] Copying nodes from the original DOM tree . . .

[0215] Copying the 10th node

[0216] Copying the 9th node

[0217] Copying the 7th node

[0218] Copying the 12th node

[0219] Copying the 1th node

[0220] Copying the 6th node

[0221] Copying the 4th node

[0222] Copying the 8th node

[0223] Copying the 3th node

[0224] Copying the 11th node

[0225] Nodes copied.

[0226] There are 14 question nodes

[0227] Selecting 10 out of total 14 nodes . . .

[0228] Copying nodes from the original DOM tree. . .

[0229] Copying the 2th node

[0230] Copying the 9th node

[0231] Copying the 5th node

[0232] Copying the 11th node

[0233] Copying the 0th node

[0234] Copying the 6th node

[0235] Copying the 13th node

[0236] Copying the 4th node

[0237] Copying the 3th node

[0238] Copying the 8th node

[0239] Nodes copied.

[0240] There are 27 question nodes

[0241] Selecting 10 out of total 27 nodes . . .

[0242] Copying nodes from the original DOM tree . . .

[0243] Copying the 21th node

[0244] Copying the 12th node

[0245] Copying the 8th node

[0246] Copying the 4th node

[0247] Copying the 24th node

[0248] Copying the 15th node

[0249] Copying the 3th node

[0250] Copying the 23th node

[0251] Copying the 14th node

[0252] Copying the 20th node

[0253] Nodes copied.

[0254] There are 30 question nodes

[0255] Selecting 10 out of total 30 nodes . . .

[0256] Copying nodes from the original DOM tree . . .

[0257] Copying the 5th node

[0258] Copying the 0th node

[0259] Copying the 8th node

[0260] Copying the 20th node

[0261] Copying the 9th node

[0262] Copying the 23th node

[0263] Copying the 24th node

[0264] Copying the 1th node

[0265] Copying the 26th node

[0266] Copying the 16th node

[0267] Nodes copied.

[0268] This produces a second DOM tree as depicted in FIG. 4. Finally, the XSL transformation may be applied, resulting in the following formatted question sheet in HTML format:

[0269] <html>

[0270] <head>

[0271] <META http-equiv=“Content-Type” content=“text/html; charset=UTF-8”>

[0272] <title>Java Software Written Test</title>

[0273] </head>

[0274] <body>

[0275] <Hl>1nstructions</H1>

[0276] <ol>

[0277] <li>Please do not write on this booklet</li>

[0278] <li>Choose one correct answer, unless otherwise specified</li>

[0279] <li>Mark your answers on the answer booklet provided</li>

[0280] <li>Source code in question statements is marked as a numbered sequence</li>

[0281] <li>Write your name, e-mail address and contact phone number on the answer booklet</li>

[0282] <li>Correct answers carry TWO marks</li>

[0283] <li>Wrong answers carry ONE NEGATIVE mark</li>

[0284] <li>Duration 1 hour</li>

[0285] </ol>

[0286] <center>

[0287] <H1>1.0 Java Programming</H1>

[0288] <H3>Basic Java Concepts</H3>

[0289] </center>1.1<b><font style=“font-size: 14pt;”>

[0290] When you invoke a program by passing a class to the Java interpreter, the Java interpreter

[0291] </font></b>

[0292] <br>

[0293] <ol type=“a”>

[0294] <LI>1nvokes your class init ( ) method</LI>

[0295] <LI>1nvokes your class starc ( ) method</LI>

[0296] <LI>Invokes your class main ( ) method</LI>

[0297] <LI>lnvokes the method that you tell it to start at</LI>

[0298] <LI>Does not invoke any method but waits for the user interaction</LI>

[0299] </ol>

[0300] OTHER QUESTIONS GO HERE . . .

[0301] <01 type=“a”>

[0302] <LI>Execution will throw core dump</LI>

[0303] <LI>65601</L1>

[0304] <LI>65</LI>

[0305] <LI>A</L1>

[0306] </ol>

[0307] </body>

[0308] </html>

[0309] The following formatted answer document may also be creating using the XSL transformation:

[0310] <html>

[0311] <head>

[0312] <META http-equiv=“Content-Type” content=“text/html; charset=UTF-8”>

[0313] <title>Java Software Written Test</title>

[0314] </head>

[0315] <body>

[0316] <center>

[0317] <Hl>Java Programming</H1>

[0318] </center>1.1 c.<br>1.2 c.<br>1.3 b.<br>1.4 e.<br>1.5 b.<br>1.6 c.<br>1.7 b.<br>1-8 c-<br>1.9 e.<br>1.10 d.<br>

[0319] <center>

[0320] <H1>Enterprise Java Programming</H1>

[0321] </center>2.1 c.<br>2.2 d.<br>2.3 c.<br>2.4 c-<br>2.5 c.<br>2.6 a<,br>2.7 a.<br>2.8 d.<br>2.9 b.<br>2.10 d.<br>

[0322] <center>

[0323] <H1>-Java GUI Progranming</H1>

[0324] </center>3.1 c.<br>3.2 c.<br>3.3 c.<br>3.4 b.<br>3.5 b.<br>3.6 d.<br>3.7 b.<br>3.8 c.<br>3.9 b.<br>3.10 c.<br>

[0325] <center>

[0326] <H1>Shell Scripts &amp; QA</H1>

[0327] </center>4.1 a.<br>4.2 b.<br>4.3 c.<br>4.4 b.<br>4.5 d.<br>4.6 d.<br>4.7 c.<br>4.8 c.<.br>4.9 a.<br>4.10 c.<br>

[0328] <center>

[0329] <H1>C++ and Programming</H1>

[0330] </center>5.1 c.<br>5.2 c.<br>5.3 d.<br>5.4 b.<br>5.5 c.<br>5.6 b.−<br>5.7 c.−<br>5.8 b.<br>5.9 a.<br>5.10 d.<br>

[0331] </body>

[0332] </html>

[0333]FIG. 5 is a block diagram illustrating an apparatus for generating a question document and an answer document from a database of questions and answers in accordance with a specific embodiment of the present invention. The database of question and answers may be in XML format. A DTD may be defined to define the XML document.

[0334] A first DOM tree creator 500 creates a first DOM tree of the entire question bank. This may be accomplished using a parsing tool, such as Java API for XML Parsing (JAXP). A user prompter 502 coupled to the first DOM tree creator 500 prompts the user to enter the number of questions from each section that should be on the test.

[0335] A random node selector 504 coupled to the user prompter 502 randomly selects a number of nodes from the first DOM tree. The number of nodes and the sections from which they are selected are based on the inputs provided by the user in response to the user prompter 502. A second DOM tree maker 506 coupled to the random node selector 504 makes a second DOM tree from the randomly selected nodes. This second DOM tree represents the final question and answer sheet. However, since it is unlikely that a user will wish to use the second DOM tree directly, a second DOM tree refiner 508 coupled to the second DOM tree maker 506 applies an stylesheet language transformation, such as an Extensible Stylesheet Language (XSL) transformation, to the second DOM tree, which converts it to a more user-friendly and printable format, such as Hypertext Markup Language (HTML) or other web presentation language.

[0336] While embodiments and applications of this invention have been shown and described, it would be apparent to those skilled in the art having the benefit of this disclosure that many more modifications than mentioned above are possible without departing from the inventive concepts herein. The invention, therefore, is not to be restricted except in the spirit of the appended claims. 

What is claimed is:
 1. A method for generating a question document and an answer document from a database of questions, the database of questions and answers contained in an extensible markup language document, wherein the questions and answers are divided into sections, the method comprising: creating a first Document Object Model (DOM) tree from the extensible markup language document, said DOM tree containing nodes for each of the sections and each question and answer in the database; prompting a user to indicate a number for each of the sections, said number representing how many questions from each of the sections should be chosen; randomly selecting a number of nodes from each of the sections in said first DOM tree; making a second DOM tree from said randomly selected nodes; and refining said second DOM tree into a question document and an answer document.
 2. The method of claim 1, wherein the extensible markup language document containing said database of questions and answers is created by porting a word processing document into extensible markup language format using a predefined Document Type Definition (DTD).
 3. The method of claim 1, wherein the extensible markup language document is in a format defined by a DTD, said DTD splitting the questions and answers into sections, defining the questions as elements and the answers as attributes to said elements.
 4. The method of claim 1, wherein said refining includes applying an stylesheet language transformation to said second DOM tree to get the question document and the answer document.
 5. The method of claim 4, wherein said stylesheet language transformation creates the question document in a web presentation language and the answer document in said web presentation language.
 6. The method of claim 1, wherein said creating includes creating a first DOM tree from the extensible markup language document using a parsing tool.
 7. An apparatus for generating a question document and an answer document from a database of questions, the database of questions and answers contained in an Extensible Markup Language (extensible markup language) document, wherein the questions and answers are divided into sections, the apparatus comprising: a first DOM tree creator; a user prompter coupled to said first DOM tree creator; a random node selector coupled to said user prompter; a second DOM tree maker coupled to said random node selector; and a second DOM tree refiner coupled to said second DOM tree maker.
 8. An apparatus for generating a question document and an answer document from a database of questions, the database of questions and answers contained in an Extensible Markup Language (extensible markup language) document, wherein the questions and answers are divided into sections, the apparatus comprising: means for creating a first DOM tree from the extensible markup language document, said DOM tree containing nodes for each of the sections and each question and answer in the database; means for prompting a user to indicate a number for each of the sections, said number representing how many questions from each of the sections should be chosen; means for randomly selecting a number of nodes from each of the sections in said first DOM tree; means for making a second DOM tree from said randomly selected nodes; and means for refining said second DOM tree into a question document and an answer document.
 9. The apparatus of claim 8, wherein the extensible markup language document containing said database of questions and answers is created by porting a word processing document into extensible markup language format using a predefined Document Type Definition (DTD).
 10. The apparatus of claim 8, wherein the extensible markup language document is in a format defined by a DTD, said DTD splitting the questions and answers into sections, defining the questions as elements and the answers as attributes to said elements.
 11. The apparatus of claim 8, wherein said refining includes applying a stylesheet language transformation to said second DOM tree to get the question document and the answer document.
 12. The apparatus of claim 11, wherein said stylesheet language transformation creates the question document in a web presentation language and the answer document in said web presentation language.
 13. The apparatus of claim 8, wherein said means for creating includes means for creating a first DOM tree from the extensible markup language document using a parsing tool.
 14. A program storage device readable by a machine, tangibly embodying a program of instructions executable by the machine to perform a method for generating a question document and an answer document from a database of questions, the database of questions and answers contained in an Extensible Markup Language (extensible markup language) document, wherein the questions and answers are divided into sections, the method comprising: creating a first DOM tree from the extensible markup language document, said DOM tree containing nodes for each of the sections and each question and answer in the database; prompting a user to indicate a number for each of the sections, said number representing how many questions from each of the sections should be chosen; randomly selecting a number of nodes from each of the sections in said first DOM tree; making a second DOM tree from said randomly selected nodes; and refining said second DOM tree into a question document and an answer document. 